package cc.eddic.practice.spring.dto;

import cc.eddic.practice.spring.domain.Category;
import cc.eddic.practice.spring.domain.Question;
import cc.eddic.practice.spring.domain.SubCategory;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class CategoryAddRequest {
    private String name;
    private List<SubCategory> subCategories;

    public Category as() {
        return new Category(this.name,this.subCategories);
    }
}
